<?php
include_once 'common.inc.php';

if($operation == 'display'){
    $list = pdo_fetchall("select uid,nickname,avatar,credit1 from ".tablename("mc_members")." where uniacid=:uniacid and avatar != '' and credit1 > 0 order by credit1 desc,createtime desc limit 100 ",array(':uniacid'=>$uniacid));

    $my_rank = 0;
    foreach ($list as $key => $value) {
        if($uid == $value['uid']){
            $my_rank = $key + 1;
        }
    }

    if($my_rank == 0){
        $my_rank = '100以外';
    }

}

include $this->template('credit1');